home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / em7sui_1 / em7sui~1.exe / CheckBoxTest.wr_ / CheckBoxTest.wr
Text File  |  1998-09-17  |  2KB  |  91 lines

  1. #VRML V2.0 utf8
  2.  
  3. # Copyright Electrohouse 1998
  4.  
  5. # This file may not be copied, modified or distributed
  6. # in any way which violates the ProtoPak licensing 
  7. # agreement established by Electrohouse.  
  8.  
  9. EXTERNPROTO em7_CheckBox [
  10.     exposedField MFString caption
  11.     exposedField SFColor captionColor
  12.     field SFFloat height
  13.     field SFBool value
  14.     eventIn SFBool set_value
  15.     eventOut SFBool value_changed
  16.     eventOut SFTime touchTime
  17. ] "..\VR_UI.wrl#em7_CheckBox"
  18.  
  19. Transform { 
  20.     translation 3 -2 0
  21.     children [ 
  22.         DEF RED_SWITCH em7_CheckBox {
  23.             caption "Red light"    
  24.             value FALSE
  25.             captionColor 1 0 0
  26.         }
  27.     ]
  28. }
  29.  
  30. Transform { 
  31.     translation 3.125 -0.3 0
  32.     children [ 
  33.         DEF GREEN_SWITCH em7_CheckBox {
  34.             caption "Green light"    
  35.             value TRUE
  36.             height 0.75
  37.             captionColor 0 1 0
  38.         }
  39.     ]
  40. }
  41.  
  42. Transform { 
  43.     translation 3.25 1 0
  44.     children [ 
  45.         DEF BLUE_SWITCH em7_CheckBox {
  46.             caption "Blue light"    
  47.             value FALSE
  48.             height 0.5
  49.             captionColor 0 0 1
  50.         }
  51.     ]
  52. }
  53.  
  54. DEF RED_LIGHT DirectionalLight {
  55.     color 1 0 0
  56.     direction -1 -1 -1
  57. }
  58.  
  59.  
  60. DEF GREEN_LIGHT DirectionalLight {
  61.     color 0 1 0
  62.     direction -1 -1 -1
  63. }
  64.  
  65. DEF BLUE_LIGHT DirectionalLight {
  66.     color 0 0 1
  67.     direction -1 -1 -1
  68. }
  69.  
  70. Shape { 
  71.     appearance Appearance {
  72.         material Material {
  73.             diffuseColor 1 1 1
  74.             specularColor 0.9 0.9 0.9
  75.             ambientIntensity 0.8
  76.             shininess 1
  77.         }
  78.     }
  79.     geometry Box {}
  80. }
  81.  
  82. Viewpoint {
  83.     description "Check box view"
  84.     position 3 0 10
  85. }
  86.  
  87. ROUTE RED_SWITCH.value_changed TO RED_LIGHT.on
  88. ROUTE GREEN_SWITCH.value_changed TO GREEN_LIGHT.on
  89. ROUTE BLUE_SWITCH.value_changed TO BLUE_LIGHT.on
  90.  
  91.